﻿using System;
using System.Collections.Generic;

class SumOfNumbersInString
{
    static void Main()
    {
        Console.WriteLine("Enter string of numbers separated by spaces:");
        string numberString = Console.ReadLine();
        numberString = numberString.Trim();
        string[] arrayOfStrings = numberString.Split(' ');
        int sumOfNumbers = 0;
        for (int index = 0; index < arrayOfStrings.Length; index++)
        {

            sumOfNumbers = sumOfNumbers + int.Parse(arrayOfStrings[index].Trim());

        }

        Console.WriteLine(sumOfNumbers);
    }
}

